﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Linq;

namespace NHTools.Base
{
    public class Context<T> : NHibernateContext
    {
        public Context(ISession session)
            : base(session)
        { }

        public IOrderedQueryable<T> Linq
        {
            get { return ProvideSession().Linq<T>(); }
        }

        protected override ISession ProvideSession()
        {
            return NHEntityBase.bf.GetSession();
        }
    }
    
}
